<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    Object admin=request.getSession().getAttribute("admin");
%>
<html>
<head>
    <title>批量导入题目</title>
   <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>

    <!-- Bootstrap Core CSS -->
    <link href="css/bootstrap.css" rel='stylesheet' type='text/css' />

        <!-- Custom CSS -->
        <link href="css/style.css" rel='stylesheet' type='text/css' />

        <!-- font-awesome icons CSS -->
        <link href="css/font-awesome.css" rel="stylesheet">
        <!-- //font-awesome icons CSS-->

        <!-- side nav css file -->
        <link href='css/SidebarNav.min.css' media='all' rel='stylesheet' type='text/css'/>
        <!-- //side nav css file -->

        <!-- js-->
        <script src="js/jquery-1.11.1.min.js"></script>
    <script src="js/modernizr.custom.js"></script>

    <!--webfonts-->
    <link href="//fonts.googleapis.com/css?family=PT+Sans:400,400i,700,700i&amp;subset=cyrillic,cyrillic-ext,latin-ext" rel="stylesheet">
    <script src="js/Chart.js"></script>
    <script src="js/metisMenu.min.js"></script>
    <script src="js/custom.js"></script>
    <link href="css/custom.css" rel="stylesheet">
    <script src="js/pie-chart.js" type="text/javascript"></script>
    <script type="text/javascript">

        $(document).ready(function () {
            $('#demo-pie-1').pieChart({
                barColor: '#2dde98',
                trackColor: '#eee',
                lineCap: 'round',
                lineWidth: 8,
                onStep: function (from, to, percent) {
                    $(this.element).find('.pie-value').text(Math.round(percent) + '%');
                }
            });

            $('#demo-pie-2').pieChart({
                barColor: '#8e43e7',
                trackColor: '#eee',
                lineCap: 'butt',
                lineWidth: 8,
                onStep: function (from, to, percent) {
                    $(this.element).find('.pie-value').text(Math.round(percent) + '%');
                }
            });

            $('#demo-pie-3').pieChart({
                barColor: '#ffc168',
                trackColor: '#eee',
                lineCap: 'square',
                lineWidth: 8,
                onStep: function (from, to, percent) {
                    $(this.element).find('.pie-value').text(Math.round(percent) + '%');
                }
            });


        });

    </script>
    <!-- //pie-chart --><!-- index page sales reviews visitors pie chart -->

    <!-- requried-jsfiles-for owl -->
    <link href="css/owl.carousel.css" rel="stylesheet">
    <script src="js/owl.carousel.js"></script>
    <script>
        $(document).ready(function() {
            $("#owl-demo").owlCarousel({
                items : 3,
                lazyLoad : true,
                autoPlay : true,
                pagination : true,
                nav:true,
            });
        });
    </script>
    <!-- //requried-jsfiles-for owl -->
    <script src="../js/jquery-1.10.2.js"></script>
</head>
<body class="cbp-spmenu-push">
<div class="header-left">
    <!--toggle button start-->
    <button id="showLeftPush"><i class="fa fa-bars"></i></button>
    <!--toggle button end-->

    <div class="header-right">
        <!--//end-search-box-->
        <div class="profile_details">
            <ul>
                <li class="dropdown profile_details_drop">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                        <div class="profile_img">
                            <span class="prfil-img"><img src="../images/logo.png" width="50px" alt=""> </span>
                            <div class="user-name">
                                <p><%=admin%></p>
                                <span>管理员</span>
                            </div>
                            <i class="fa fa-angle-down lnr"></i>
                            <i class="fa fa-angle-up lnr"></i>
                            <div class="clearfix"></div>
                        </div>
                    </a>
                    <ul class="dropdown-menu drp-mnu">
                        <li> <a href="/examproject/man/tuichu"><i class="fa fa-cog"></i> 退出</a> </li>
                    </ul>
                </li>
            </ul>
        </div>
        <div class="clearfix"> </div>
    </div>
    <div class="clearfix"> </div>
</div>
<div class="main-content">
    <div class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-left" id="cbp-spmenu-s1">
        <!--left-fixed -navigation-->
        <aside class="sidebar-left">
            <nav class="navbar navbar-inverse">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".collapse" aria-expanded="false">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <h1><a class="navbar-brand" href="index.jsp"><span class="fa fa-area-chart"></span>network<span class="dashboard_text">考试网</span></a></h1>
                </div>
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <ul class="sidebar-menu">
                        <li class="header">考试网后台管理系统</li>
                        <li class="treeview">
                            <a href="/examproject/manage/examcenter.jsp">
                                <i class="fa fa-laptop"></i>
                                <span>试卷中心</span>
                                <i class="fa fa-angle-left pull-right"></i>
                            </a>
                            <ul class="treeview-menu">
                                <li><a href="/examproject/manage/examcenter.jsp"><i class="fa fa-angle-right"></i>试卷操作</a></li>
                                <li><a href="/examproject/manage/scoretop.jsp"><i class="fa fa-angle-right"></i>成绩排行榜</a></li>
                                <li><a href="/examproject/manage/falsetop.jsp"><i class="fa fa-angle-right"></i>错题排行榜</a></li>
                            </ul>
                        </li>
                        <li class="treeview">
                            <a href="/examproject/manage/testlog.jsp">
                                <i class="fa fa-dashboard"></i> <span>考试记录</span>
                            </a>
                        </li>

                        <li class="treeview">
                            <a href="/examproject/manage/mmessage.jsp">
                                <i class="fa fa-dashboard"></i> <span>留言管理</span>
                            </a>
                        </li>
                        <li class="treeview">
                            <a href="#">
                                <i class="fa fa-laptop"></i>
                                <span>班级管理</span>
                                <i class="fa fa-angle-left pull-right"></i>
                            </a>
                            <ul class="treeview-menu">
                                <li><a href="/examproject/man/cxsybj"><i class="fa fa-angle-right"></i>各班学生考试情况</a></li>
                                <li><a href="/examproject/man/findhom"><i class="fa fa-angle-right"></i>各班学生作业未完成情况</a></li>
                            </ul>
                        </li>
                        <li class="treeview">
                            <a href="/examproject/man/stugetPage">
                                <i class="fa fa-dashboard"></i> <span>学生管理</span>
                            </a>
                        </li>
                        <li class="treeview">
                            <a href="/examproject/man/getPage">
                                <i class="fa fa-dashboard"></i> <span>老师管理</span>
                            </a>
                        </li>

                        <li class="treeview">
                            <a href="#">
                                <i class="fa fa-laptop"></i>
                                <span>题库中心</span>
                                <i class="fa fa-angle-left pull-right"></i>
                            </a>
                            <ul class="treeview-menu">
                                <li><a href="/examproject/manage/tt.jsp"><i class="fa fa-angle-right"></i>新增考题</a></li>
                                <li><a href="/examproject/manage/CloudReadExecl.jsp"><i class="fa fa-angle-right"></i> excel批量导入考题 </a></li>
                                <li><a href="/examproject/manage/questionscenter.jsp"><i class="fa fa-angle-right"></i> 试题中心查看 </a></li>
                            </ul>
                        </li>
                        <li class="treeview">
                            <a href="#">
                                <i class="fa fa-dashboard"></i> <span>视频中心</span>
                            </a>
                            <ul class="treeview-menu">
                                <li><a href="/examproject/manage/stuvideo.jsp"><i class="fa fa-angle-right"></i>教学视频</a></li>
                                <li><a href="/examproject/manage/clsvideo.jsp"><i class="fa fa-angle-right"></i> 课堂回放 </a></li>
                            </ul>
                        </li>
                        <li class="treeview">
                            <a href="#">
                                <i class="fa fa-laptop"></i>
                                <span>安全设置</span>
                                <i class="fa fa-angle-left pull-right"></i>
                            </a>
                            <ul class="treeview-menu">
                                <li><a href="/examproject/man/chazcm"><i class="fa fa-angle-right"></i>学生注册码</a></li>
                                <li><a href="/examproject/man/chazcm"><i class="fa fa-angle-right"></i>老师注册码</a></li>
                            </ul>
                        </li>

                    </ul>
                </div>
                <!-- /.navbar-collapse -->
            </nav>
        </aside>
    </div>
</div>
<div style="width:1800px;height: 600px;margin-left: 250px;margin-right:250px;margin-top:20px">
    <div style="width:80%;margin-top: 50px;margin-left: 30px;">
        <h2 style="color: red">注:</h2>
        <p>批量导入的表需为12个字段,第一个字段为:题目ID,第二个字段为:题目内容,第三个字段为:题目分数,第四个字段为:创建用户ID</p>
        <p>第五个字段为:题目类型(1表示单选、2表示多选),第六个字段为:题目选项A,第七个字段为:题目选项B,第八个字段为:题目选项C</p>
        <p>第九个字段为:题目选项D,第十个字段为:题目答案,第十一个字段为:更新时间,第十二个字段为:书籍分类(1、Java基础，2、JavaOOP，3、MySQL，4、HTML5，5、JAVAWeb，6、高级框架,7、Linux、GIT)</p>
        <h1>批量导入功能介绍:</h1>
        <p>本导入功能会从第二行第二列开始导入,但需拥有12个字段，会自动跳过第一行以及第一列,更新时间不会以表中的时间为准,以当前导入时间为准自动添加！！！</p>
        <form action="/examproject/man/pdfile" method="post" enctype="multipart/form-data">
            <input type="file" name="wj"/>
            <button type="submit" style="background-color: #0fccbc; width: 200px; height: 100px; font-size: 20px">上传</button>
        </form>
    </div>
</div>
<script>
    var ts=<%=request.getParameter("ts")%>;
    if(ts==true){
        alert("导入成功");
    }
</script>
<script src="js/Chart.bundle.js"></script>
<script src="js/utils.js"></script>

<script>
    document.getElementById('randomizeData').addEventListener('click', function() {
        var zero = Math.random() < 0.2 ? true : false;
        barChartData.datasets.forEach(function(dataset) {
            dataset.data = dataset.data.map(function() {
                return zero ? 0.0 : randomScalingFactor();
            });

        });
        window.myBar.update();
    });

    var colorNames = Object.keys(window.chartColors);
    document.getElementById('addDataset').addEventListener('click', function() {
        var colorName = colorNames[barChartData.datasets.length % colorNames.length];;
        var dsColor = window.chartColors[colorName];
        var newDataset = {
            label: 'Dataset ' + barChartData.datasets.length,
            backgroundColor: color(dsColor).alpha(0.5).rgbString(),
            borderColor: dsColor,
            borderWidth: 1,
            data: []
        };

        for (var index = 0; index < barChartData.labels.length; ++index) {
            newDataset.data.push(randomScalingFactor());
        }

        barChartData.datasets.push(newDataset);
        window.myBar.update();
    });

    document.getElementById('addData').addEventListener('click', function() {
        if (barChartData.datasets.length > 0) {
            var month = MONTHS[barChartData.labels.length % MONTHS.length];
            barChartData.labels.push(month);

            for (var index = 0; index < barChartData.datasets.length; ++index) {
                //window.myBar.addData(randomScalingFactor(), index);
                barChartData.datasets[index].data.push(randomScalingFactor());
            }

            window.myBar.update();
        }
    });

    document.getElementById('removeDataset').addEventListener('click', function() {
        barChartData.datasets.splice(0, 1);
        window.myBar.update();
    });

    document.getElementById('removeData').addEventListener('click', function() {
        barChartData.labels.splice(-1, 1); // remove the label first

        barChartData.datasets.forEach(function(dataset, datasetIndex) {
            dataset.data.pop();
        });

        window.myBar.update();
    });
</script>
<!-- new added graphs chart js-->

<!-- Classie --><!-- for toggle left push menu script -->
<script src="js/classie.js"></script>
</body>
</html>
